﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="buyer_categoryCollect.aspx.cs"
    Inherits="PeisongWeb.buyer_categoryCollect" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>采购配送系统-商品分类统计</title>
    <!--#include file="../global.inc" -->
    <script src="/app_common/scripts/jquery-latest.pack.js" type="text/javascript"></script>
    <script type="text/javascript">
        function resetSrh() {
            document.getElementById("drp_CategoryRoot").value = "";
            document.getElementById("drp_CategorySub").value = "";
        }
    </script>

    <script src="/fromjs/fillscreenFix.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="sm1" runat="server">
    </asp:ScriptManager>
    <div id="container">
        <uc1:headerV2 runat="server" ID="header1" />
        <div id="homemain">
            <div id="main">
                <div class="title">
                    <div class="title_text">
                        <ul>
                            <li class="color1">商品分类统计</li>
                        </ul>
                    </div>
                </div>
                <div class="line_top">
                </div>
                <asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
                    <ContentTemplate>
                        <div id="mainmiddle">
                            <div class="search_list">
                                <div class="search_title">
                                    <span>商品分类统计</span>
                                </div>
                                <div class="listsearch">
                                    <ul>
                                        <li style="width: auto;">
                                            <label style="width: auto">
                                                大类：
                                            </label>
                                            <asp:DropDownList runat="server" ID="drp_CategoryRoot" DataTextField="name" DataValueField="categoryId"
                                                AutoPostBack="True" OnSelectedIndexChanged="ddl_CategoryRoot_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </li>
                                        <li style="width: auto; margin-right: 30px">
                                            <label>
                                                小类：
                                            </label>
                                            <asp:DropDownList runat="server" ID="drp_CategorySub" DataTextField="name" DataValueField="categoryId">
                                            </asp:DropDownList>
                                        </li>
                                        <li>
                                            <asp:Button CssClass="button_round" runat="server" ID="btn_select" Text="查 询" OnClick="btn_select_Click" />
                                        </li>
                                        <li>
                                            <input class="button_round" type="button" value="重 置" id="btn_reset" onclick="resetSrh()" />
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="list_content">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr class="list_title">
                                        <td width="15%">
                                            商品大类
                                        </td>
                                        <td width="15%">
                                            商品小类
                                        </td>
                                        <td width="15%">
                                            平均单价
                                        </td>
                                        <td width="15%">
                                            平均数量
                                        </td>
                                        <td width="15%">
                                            总数量
                                        </td>
                                        <td width="15%">
                                            商品小计
                                        </td>
                                        <td width="10%">
                                            详细信息
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellspacing="0" cellpadding="0" class="list_border">
                                    <asp:Repeater ID="rpt_list" runat="server">
                                        <ItemTemplate>
                                            <tr class='<%# Container.ItemIndex%2==0?"":"tr_color"  %>'>
                                                <td width="15%">
                                                    <%#Eval("parentName")%>
                                                </td>
                                                <td width="15%">
                                                    <%# Eval("subCategory")%>
                                                </td>
                                                <td width="15%">
                                                    <%#String.Format("{0:F2}", Eval("avgPrice")).ToString()%>
                                                </td>
                                                <td width="15%">
                                                    <%#String.Format("{0:F2}",Eval("avgQuantity"))%>
                                                </td>
                                                <td width="15%">
                                                    <%#Eval("sumQuantity")%>
                                                </td>
                                                <td width="15%">
                                                    <%# String.Format("{0:F2}", Eval("sumAmount")).ToString()%>
                                                </td>
                                                <td width="10%">
                                                    <a href="buyer_categoryCollectDetails<%#Eval("categoryId")%>.html">
                                                        <img alt="" src="/app_common/images/cha.gif" /></a>
                                                </td>
                                            </tr>
                                        </ItemTemplate>
                                    </asp:Repeater>
                                </table>
                            </div>
                            <div class="page">
                                <webdiyer:AspNetPager ID="AspNetPager1" NumericButtonType="Text" MoreButtonType="Text"
                                    AlwaysShow="true" Width="98%" runat="server" PageSize="15" InvalidPageIndexErrorMessage="无效页码"
                                    NumericButtonCount="5" PageIndexOutOfRangeErrorMessage="页码超出范围" ShowCustomInfoSection="Left"
                                    CustomInfoHTML=" 每页%PageSize%条记录 | 总共%RecordCount%条记录 " CustomInfoTextAlign="Left"
                                    HorizontalAlign="Right" OnPageChanged="AspNetPager1_PageChanged" NextPageText=">"
                                    FirstPageText="<<首页" LastPageText="末页>>" PrevPageText="<" CssClass="paginator"
                                    CurrentPageButtonClass="cpb">
                                </webdiyer:AspNetPager>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
        <uc1:footerV2 runat="server" ID="footer1" />
    </div>
    </form>
</body>
</html>
